Class symantec.itools.db.beans.dbnav.model.TreeNodeComponent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.db.beans.dbnav.model.TreeNodeComponent

Object
   |
   +----symantec.itools.db.beans.dbnav.model.TreeNodeComponent

public abstract class TreeNodeComponent
extends Object
implements TreeNode

This class represents the Component from the Composite design pattern. The default implementation is for a Leaf.

The other participants in Composite pattern are: TreeNodeLeaf - the Leaf TreeNodeComposite - the Composite TreeNodeBuilder - the Client

Version:
1.0 06/13/98
Author:
Hristo Tonev

Constructor Index

 o symantec.itools.db.beans.dbnav.model.TreeNodeComponent()
Default constructor
 o symantec.itools.db.beans.dbnav.model.TreeNodeComponent(DataItem)

Method Index

 o addChild(TreeNodeComponent)
This method makes sence only for the composite object.
 o children()
Returns the children of the reciever as an Enumeration.
 o getAllowsChildren()
Returns true if the receiver allows children.
 o getChildAt(int)
Returns the child TreeNode at index childIndex.
 o getChildCount()
Returns the number of children TreeNodes the receiver contains.
 o getDataItem()
 o getIndex(TreeNode)
Returns the index of node in the receivers children.
 o getParent()
Returns the parent TreeNode of the receiver.
 o isLeaf()
Returns true if the receiver is a leaf.
 o removeChild(TreeNodeComponent)
This method makes sence only for the composite object.
 o setDataItem(DataItem)
 o setParent(TreeNodeComponent)
 o toString()
Overriding toString() method here is very important

Constructors

 o TreeNodeComponent
public TreeNodeComponent()
Default constructor

 o TreeNodeComponent
public TreeNodeComponent(DataItem dataItem)

Methods

 o addChild
public void addChild(TreeNodeComponent child)
This method makes sence only for the composite object. The default implementation does nothing.

 o children
public java.util.Enumeration children()
Returns the children of the reciever as an Enumeration.

 o getAllowsChildren
public boolean getAllowsChildren()
Returns true if the receiver allows children.

 o getChildAt
public com.sun.java.swing.tree.TreeNode getChildAt(int childIndex)
Returns the child TreeNode at index childIndex.

 o getChildCount
public int getChildCount()
Returns the number of children TreeNodes the receiver contains.

 o getDataItem
public symantec.itools.db.beans.dbnav.model.DataItem getDataItem()
 o getIndex
public int getIndex(TreeNode node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.

 o getParent
public com.sun.java.swing.tree.TreeNode getParent()
Returns the parent TreeNode of the receiver.

 o isLeaf
public boolean isLeaf()
Returns true if the receiver is a leaf.

 o removeChild
public void removeChild(TreeNodeComponent child)
This method makes sence only for the composite object. The default implementation does nothing.

 o setDataItem
public void setDataItem(DataItem dataItem)
 o setParent
public void setParent(TreeNodeComponent parent)
 o toString
public java.lang.String toString()
Overriding toString() method here is very important

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index